<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>授权页面</title>
</head>
<body>
	我是授权页面
	<h1 id="code"></h1>
	<br/>
	<h1 id="state"></h1>
	<br/>
	<h1 id="url"></h1>
	<script>
		function getQueryString(name) {
	        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
	        var r = window.location.search.substr(1).match(reg); 
	        if (r != null) return unescape(r[2]); 
	        return null; 
	    } 
		var code = getQueryString('code');
		var state = getQueryString('state');
		document.getElementById("code").innerHTML = code;
		document.getElementById("state").innerHTML = state;
		document.getElementById("url").innerHTML = window.location;
		window.onload= function(){
			alert('alert');
		}
	</script>
</body>
</html>